<template>
  <div class="consultant">
    <img class="logo" src="@assets/images/consultant.png" alt="" />
    <p>您的专属顾问</p>
    <van-button color="#FD9100" block round :url="`tel:${consultPhone}`">立即拨打</van-button>
  </div>
</template>

<script>
import { Button } from 'vant';
import { user_getSalesmanPhone } from '@api/service';

export default {
  components: {
    [Button.name]: Button
  },
  data() {
    return {
      consultPhone: ''
    };
  },
  mounted() {
    this.getConsultPhone();
  },
  methods: {
    async getConsultPhone() {
      let res = await user_getSalesmanPhone();
      if (res.code === 200) {
        this.consultPhone = res.data;
      } else {
        Toast(res.msg);
      }
    }
  }
};
</script>

<style lang="scss" scoped>
.consultant {
  text-align: center;
  padding: 66px 160px 0;
  box-sizing: border-box;
}
.logo {
  width: 210px;
  height: 210px;
}
p {
  color: #121b32;
  font-size: 32px;
  margin: 90px 0 76px;
}
</style>
